home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / showtext.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  699b  |  30 lines

  1. #ifndef __SHOW_TEXT_H_
  2. #define __SHOW_TEXT_H_
  3.  
  4.  
  5. #include "ljfonts.h"
  6. #include <alloc.h>
  7. #include <string.h>
  8.  
  9. class ShowText
  10.     {
  11.     protected:
  12.     char* buffer;     // work buffer
  13.     ljfont* fnt;
  14.     public:
  15.     ShowText()
  16.         {
  17.         buffer = NULL; fnt = NULL;
  18.         }
  19.     ~ShowText() { delete buffer; buffer = NULL; delete fnt; fnt = NULL; }
  20.  
  21.     void loadFont(char* fontName = "hv08a.sfp");
  22.     void unLoadFont()
  23.         { delete buffer; buffer = NULL; delete fnt; fnt = NULL; }
  24.     void show(loc pos,                  // left-top of viewport
  25.           char* string,
  26.           loc scale = loc(1, 1), int interval = 15,
  27.           int direction = HORIZ_DIR, int mode = COPY_PUT);
  28.     };
  29.  
  30. #endif __SHOW_TEXT_H_